package kr.hkit.powerjava.chapter14.programming;

import javax.swing.JPanel;
import javax.swing.JLabel;
import java.awt.GridLayout;
import javax.swing.JTextField;
import javax.swing.BoxLayout;
import java.awt.Component;
import java.awt.FlowLayout;

public class MPanel extends JPanel {
	private JLabel lbMile;
	private JTextField tfIn;

	/**
	 * Create the panel.
	 */
	public MPanel() {

		initialize();
	}
	private void initialize() {
		setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
		
		lbMile = new JLabel("거리를 마일 단위로 입력하시오");
		add(lbMile);
		
		tfIn = new JTextField();
		add(tfIn);
		tfIn.setColumns(5);
		
	}
	public String getTfIn() {
		return tfIn.getText();
	}
	public void setTfIn(String text) {
		tfIn.setText(text);;
	}

}
